import {getNodeAttribute, getNodeAttributeByModule} from '@/api/wf/workflow'

export default {
  data() {
    return {
      wfNode: {
        showDescription: '0',
        dueAuto: '0',
        nextUserList: [],
        candidate: {},
        status: '0',
        procInstId: '',
      },
      multiple: false,
    }
  },
  computed: {
    showDesc() {
      return this.wfNode.showDescription === '1'
    },
    showUserSelect() {
      return this.wfNode.dueAuto === '1'
    }
  },
  beforeCreate() {

  },
  mounted() {
  },
  methods: {
    initNodeAttribute(params) {
      return getNodeAttributeByModule(params).then(res => {
        this.form && (this.form.selectAssigneeList=[])
        this.wfNode = res.data
        if(this.wfNode.candidate){
          this.multiple = this.wfNode.candidate.multi
        }
      })
    }
  }
}
